#define _CRT_SECURE_NO_WARNINGS


#include <stdio.h>
#include <stdlib.h>
int main() {
    int a[200];
    int b[200];
    int n;
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++)
            scanf("%d", &a[i]);
        mergesort(a, b, 0, n - 1);
        for (int i = 0; i < n; i++)
            printf("%d ", a[i]);
        printf("\n");
    }
    return 0;
}
void mergesort(int a[], int b[], int s, int t) {
    if (s < t) {
        int m = (s + t) / 2;
        mergesort(a, b, s, m);
        mergesort(a, b, m + 1, t);
        merge(a, b, s, m, t);
        copy(a, b, s, t);
    }
}
void merge(int a[], int b[], int s, int m, int t) {
    int i = s, j = m + 1, k = s;
    while (i <= m && j <= t) {
        if (a[i] < a[j])
            b[k++] = a[i++];
        else
            b[k++] = a[j++];
    }
    while (i <= m) {
        b[k++] = a[i++];
    }
    while (j <= t) {
        b[k++] = a[j++];
    }
}
void copy(int a[], int b[], int s, int t) {
    for (int i = s; i <= t; i++) {
        a[i] = b[i];
    }
}


#include <stdio.h>
#include <stdlib.h>
int main() {
    int a[200];
    int b[200];
    int c[200];
    int n, m;
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++)
            scanf("%d", &a[i]);
        scanf("%d", &m);
        for (int i = 0; i < m; i++)
            scanf("%d", &b[i]);
        merge(a, b, c, n, m);
        for (int i = 0; i < n + m; i++)
            printf("%d ", c[i]);
        printf("\n");
        printf("\n");
    }
    return 0;
}
void merge(int a[], int b[], int c[], int al, int bl) {
    int i = 0, j = 0, k = 0;
    while (i < al && j < bl) {
        if (a[i] < b[j])
            c[k++] = a[i++];
        else
            c[k++] = b[j++];
    }
    while (i < al) {
        c[k++] = a[i++];
    }
    while (j < bl) {
        c[k++] = b[j++];
    }
}

#include <stdio.h>
#include <stdlib.h>
int patition(int a[], int p, int q) {
    int j, i = p;
    int x = a[p];
    for (j = p + 1; j <= q; j++)
    {
        if (a[j] < x) {
            i++;
            swap(a, i, j);
        }
    }
    swap(a, i, p);
    return i;
}
int qselect(int a[], int s, int t, int k) {
    if (s == t) return a[s];
    if (s < t)
    {
        int i = patition(a, s, t);
        int j = i - s + 1;
        if (j >= k) return qselect(a, s, i, k);
        if (j < k) return qselect(a, i + 1, t, k - j);
    }
}
void swap(int a[], int i, int j) {
    int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
}
int main() {
    int n, k;
    int a[200000];
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++) {
            scanf("%d", &a[i]);
        }
        if (n % 2 == 1) {
            k = (n + 1) / 2;
            printf("%d\n", qselect(a, 0, n - 1, k));
        }
        else {
            k = n / 2;
            double sum = (qselect(a, 0, n - 1, k) + qselect(a, 0, n - 1, k + 1)) / 2.;
            printf("%.3lf\n", sum);
        }
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
int main() {
    int n;
    int a[200];
    int k;
    char c;
    while (~scanf("%d", &a[0])) {
        int n = 0;
        while (scanf("%d", &a[++n])) {
            if (c = getchar() == '\n') break;
        }
        scanf("%d", &k);
        int z = solve(a, 0, n, k);
        printf("%d\n", z);
    }
    return 0;
}
int patition(int a[], int p, int q) {
    int j, i = p;
    int x = a[p];
    for (j = p + 1; j <= q; j++)
    {
        if (a[j] < x) {
            i++;
            swap(a, i, j);
        }
    }
    swap(a, i, p);
    return i;
}
int solve(int a[], int p, int q, int k) {
    if (p == q) return a[p];
    if (p < q)
    {
        int i = patition(a, p, q);
        int j = i - p + 1;
        if (j == k) return a[i];
        if (j > k) return solve(a, p, i, k);
        if (j < k) return solve(a, i + 1, q, k - j);
    }
}
void swap(int a[], int i, int j) {
    int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int patition(int a[], int p, int q) {
    int i = rand() % (q - p + 1) + p;
    swap(a, i, p);
    i = p;
    int j;
    int x = a[p];
    for (j = p + 1; j <= q; j++)
    {
        if (x > a[j])
        {
            i++;
            swap(a, i, j);
        }
    }
    swap(a, i, p);
    return i;
}
void sort(int a[], int s, int t) {
    if (s < t) {
        int r = patition(a, s, t);
        sort(a, s, r - 1);
        sort(a, r + 1, t);
    }
}
void swap(int a[], int i, int j) {
    int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
}
int main() {
    int a[200];
    int n;
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++)
            scanf("%d", &a[i]);
        sort(a, 0, n - 1);
        for (int i = 0; i < n; i++)
            printf("%d ", a[i]);
        printf("\n");
    }
    return 0;
}

#include<stdio.h>
int main() {
    int t;
    int a, b;
    scanf("%d", &t);
    while (scanf("%d %d", &a, &b) != EOF) {
        printf("%d %d\n", b - a, a);
    }
    return 0;
}
